#include "StdAfx.h"
#include "TinyTCPIF.h"

CTinyTCPIF::CTinyTCPIF(void)
{
}

CTinyTCPIF::~CTinyTCPIF(void)
{
}

bool CTinyTCPIF::sendMsg(int socketID,CTinyMsg& msg)
{
	long length;
	TinyCC::msg::CTinyTCPMsg tinyTCPMsg;
	const char * data = tinyTCPMsg.package(length,&msg);

	if(length>0)
	{
		m_TCPServer->sendData(socketID,(void*)data,length);
		return true;
	}
	else
		return false;
}

bool CTinyTCPIF::isConnected(int socketID)
{
	return m_TCPServer->isConnected(socketID);
}
